package com.wang.other_test.test;

import lombok.Data;

import java.util.Objects;

/**
 * @author: lvyan
 * @date: 2022/10/6
 * @description:
 */
@Data
public class Cat {
    public String name;
    public Integer age;
    public Object answer;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Cat cat = (Cat) o;
        return Objects.equals(name, cat.name) && Objects.equals(age, cat.age) && Objects.equals(answer, cat.answer);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age, answer);
    }
}
